package com.example.yuejian2.adapter;

import android.content.Context;

import com.example.yuejian2.R;
import com.example.yuejian2.bean.MasterQAEntity;
import com.yuyh.easyadapter.recyclerview.EasyRVAdapter;
import com.yuyh.easyadapter.recyclerview.EasyRVHolder;

import java.util.List;

public class MasterQAAdapter extends EasyRVAdapter<MasterQAEntity> {

    public MasterQAAdapter(Context context, List<MasterQAEntity> list, int... layoutIds) {
        super(context, list, layoutIds);
    }

    @Override
    protected void onBindData(EasyRVHolder viewHolder, final int position, final MasterQAEntity item) {
        viewHolder.setText(R.id.question, "问题: "+item.getUser_question());
        viewHolder.setText(R.id.answer, "答案: "+item.getAnswer());
    }

    @Override
    public int getLayoutIndex(int position, MasterQAEntity item) {
        return 0;
    }

}